<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@  taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="my" uri="/mytag"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">


<link href="AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet"
	type="text/css" />
<link href="AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet"
	type="text/css" />
<link href="basic/css/demo.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/site-nav.css">
<link type="text/css" href="css/optstyle.css" rel="stylesheet" />
<link type="text/css" href="css/style.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="css/detail.css">

<script src="js/basevalue.js"></script>
<script type="text/javascript" src="basic/js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="basic/js/quick_links.js"></script>
<script type="text/javascript" src="AmazeUI-2.4.2/assets/js/amazeui.js"></script>
<script type="text/javascript" src="js/jquery.imagezoom.min.js"></script>
<script type="text/javascript" src="js/jquery.flexslider.js"></script>
<script type="text/javascript" src="js/login.js"></script>
<script type="text/javascript" src="js/cookie_util.js"></script>
<script src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/parabola.js"></script>

<title>detail</title>
</head>
<body>
	<div id="target" class="target"></div>
	<div id="certain"
		style="display: none; width: 100%; left: 0px; top: 0px; height: 100%; position: fixed; background: black; opacity: 0.3; z-index: 999999;"></div>
	<div id="productId">${requestScope.item.productId }</div>
	<!-- 分解字符串 -->
	<c:set value="${ fn:split(requestScope.item.detailsImages, ',') }"
		var="pics" />
	<!--顶栏-->
	<div class="site-nav">
		<div class="sn-bg"></div>
		<div class="sn-con">
			<p class="sn-home">
				<i class="am-icon-home"></i> <a href="index.jsp">爱购首页</a>
			</p>
			<p class="sn-login-info">
				<c:if test="${ empty sessionScope.u.nickname }" var="login">
					<span>汪, 欢迎来到爱购 </span>
					<span> &nbsp;<a href="login.jsp">请登录</a>
					</span>
					<span class="sn-logout-info"> <a href="regist.jsp">免费注册</a>
					</span>
				</c:if>
				<c:if test="${!login }">
					<span>Hi, <a href="">${sessionScope.u.nickname }</a>
					</span>
					<span> <i class="am-icon-comments"></i>&nbsp;消息<a href="">3</a>
					</span>
					<span class="sn-logout-info"> <a href="user/logout.do">退出</a>
					</span>
				</c:if>
			</p>
			<ul class="sn-quick-menu">
				<li class="myiGo"><i class="am-icon-user"></i> <a
					href="myorders.do">我的爱购</a></li>
				<li class="sn-mybrand"><i class="am-icon-heart"></i> <a href="">我关注的品牌</a>
				</li>
				<li class="sn-cart"><i class="am-icon-shopping-cart"></i> <a
					href="myshoppingCart.do">购物车</a> <c:set
						property="${sessionScope.map3 }" var="shoppingcart"></c:set> <span
					name="count"> <my:pt value="${sessionScope.map3 }" />
				</span> 件</li>
			</ul>
		</div>
	</div>
	<!--iGo&搜索-->
	<div class="header">
		<div class="header-con">
			<h1 class="iGologo">
				<a href="">爱购iGo.com</a>
			</h1>
			<div class="shopextra">
				<span name="shopname" class="shopname">${requestScope.item.seller.salerName }</span>
			</div>
			<div class="search" name="search">
				<form action="searchkey.do" method="get">
					<input type="text" placeholder="潮女冬季必备" name="key"
						class="search-inp">
					<!-- 这里提供查询的类名 按名字搜索了 -->
					<input style="display: none" type="text" name="search_kind"
						value="name" class="search-inp">
					<button type="submit" class="search-btn">搜索</button>
				</form>
			</div>
		</div>
		<hr class="clear-float-both">
	</div>

	<div class="clear"></div>
	<b class="line-margintop-40"></b>

	<!-- 正文内容-->
	<div class="listMain">
		<script type="text/javascript">
        /*   
		$(function() {});
            $(window).load(function() {
                $('.flexslider').flexslider({
                    animation: "slide",
                    start: function(slider) {
                        $('body').removeClass('loading');
                    }
                });
            });
            */
        </script>
		<div class="scoll">
			<section class="slider">
			<div class="flexslider">
				<ul class="slides">
					<li><img src="uploads/${pics[0] }" title="pic" /></li>
					<li><img src="uploads/${pics[1] }" /></li>
					<li><img src="uploads/${pics[2] }" /></li>
					<li><img src="uploads/${pics[3] }" /></li>
				</ul>
			</div>
			</section>
		</div>

		<!--放大镜-->

		<div class="item-inform">
			<div class="clearfixLeft" id="clearcontent">

				<div class="box">
					<script type="text/javascript">
					/*
                        $(document).ready(function() {
                            $(".jqzoom").imagezoom();
                            $("#thumblist li a").click(function() {
                                $(this).parents("li").addClass("tb-selected").siblings().removeClass("tb-selected");
                                $(".jqzoom").attr('src', $(this).find("img").attr("mid"));
                                $(".jqzoom").attr('rel', $(this).find("img").attr("big"));
                            });
                        });
					*/
                    </script>


					<div class="tb-booth tb-pic tb-s310">
						<!-- 左边大图 -->
						<a href="uploads/${pics[0] }"><img src="uploads/${pics[0] }"
							alt="细节展示放大镜特效" rel="uploads/${pics[0] }" class="jqzoom" /></a>
					</div>
					<!-- 四个小图 -->
					<ul class="tb-thumb" id="thumblist">
						<li class="tb-selected">
							<div class="tb-pic tb-s40">
								<a href="#"><img src="uploads/${pics[0] }"
									mid="uploads/${pics[0] }" big="uploads/${pics[0] }"></a>
							</div>
						</li>
						<li>
							<div class="tb-pic tb-s40">
								<a href="#"><img src="uploads/${pics[1] }"
									big="uploads/${pics[1] }" big="uploads/${pics[1] }"></a>
							</div>
						</li>
						<li>
							<div class="tb-pic tb-s40">
								<a href="#"><img src="uploads/${pics[2] }"
									mid="uploads/${pics[2] }" big="uploads/${pics[2] }"></a>
							</div>
						</li>
						<li>
							<div class="tb-pic tb-s40">
								<a href="#"><img src="uploads/${pics[3] }"
									mid="uploads/${pics[3] }" big="uploads/${pics[3] }"></a>
							</div>
						</li>
					</ul>
				</div>

				<div class="clear"></div>
			</div>

			<div class="clearfixRight">

				<!--规格属性-->
				<!--名称-->
				<div class="tb-detail-hd">
					<h1>${requestScope.item.productName }</h1>
				</div>
				<div class="tb-detail-list">
					<!--价格-->
					<div class="tb-detail-price">
						<li class="price iteminfo_price">
							<dt>原价</dt>
							<dd>
								<em>¥</em><b class="sys_item_price">
									${requestScope.item.price}</b>
							</dd>
						</li>
						<div class="clear"></div>
					</div>

					<!--销量-->
					<ul class="tm-ind-panel">
						<li class="tm-ind-item tm-ind-sellCount canClick">
							<div class="tm-indcon">
								<span class="tm-label">月销量</span><span class="tm-count">${requestScope.item.saleAmount }</span>
							</div>
						</li>
						<li class="tm-ind-item tm-ind-sumCount canClick">
							<div class="tm-indcon">
								<span class="tm-label">累计销量</span><span class="tm-count">6015</span>
							</div>
						</li>
						<li class="tm-ind-item tm-ind-reviewCount canClick tm-line3">
							<div class="tm-indcon">
								<span class="tm-label">点击量</span><span class="tm-count">${requestScope.item.clickAmount }</span>
							</div>
						</li>
					</ul>
					<div class="clear"></div>

					<!--各种规格-->
					<dl class="iteminfo_parameter sys_item_specpara">
						<dt class="theme-login">
							<div class="cart-title">
								可选规格<span class="am-icon-angle-right"></span>
							</div>
						</dt>
						<dd>
							<!--操作页面-->

							<div class="theme-popover-mask"></div>

							<div class="theme-popover">
								<div class="theme-span"></div>
								<div class="theme-poptit">
									<a href="javascript:;" title="关闭" class="close">×</a>
								</div>
								<div class="theme-popbod dform">
									<form class="theme-signin" name="loginform" action=""
										method="post">

										<div class="theme-signin-left">

											<div class="theme-options">
												<div class="cart-title number">数量</div>
												<dd>
													<input id="min" class="am-btn am-btn-default" name=""
														type="button" value="-" /> <input id="text_box" name=""
														type="text" value="1" style="width: 30px;" /> <input
														id="add" class="am-btn am-btn-default" name=""
														type="button" value="+" /> <span id="Stock"
														class="tb-hidden">库存<span class="stock">${requestScope.item.amount }</span>件
													</span>
												</dd>

											</div>
											<div class="clear"></div>

											<div class="btn-op">
												<div class="btn am-btn am-btn-warning">确认</div>
												<div class="btn close am-btn am-btn-warning">取消</div>
											</div>
										</div>
										<div class="theme-signin-right">
											<div class="img-info">
												<img src="" />
											</div>
											<div class="text-info">
												<span class="J_Price price-now">¥39.00</span> <span
													id="Stock" class="tb-hidden">库存<span class="stock">1000</span>件
												</span>
											</div>
										</div>

									</form>
								</div>
							</div>

						</dd>
					</dl>
					<div class="clear"></div>
					<!--活动	-->
					<div class="shopPromotion gold">
						<div class="hot">
							<dt class="tb-metatit">天猫购物券</dt>
							<div class="gold-list">
								<p>
									${requestScope.item.desciption }<span>点击领券<i
										class="am-icon-sort-down"></i></span>
								</p>
							</div>
						</div>
						<div class="clear"></div>
						<div class="coupon">
							<dt class="tb-metatit">优惠券</dt>
							<div class="gold-list">
								<ul>
									<li>225减5</li>
									<li>298减10</li>
									<li>498减20</li>
								</ul>
							</div>
						</div>
					</div>
				</div>

				<div class="pay">
					<div class="pay-opt">
						<a href="home.html"><span class="am-icon-home am-icon-fw">首页</span></a>
						<a><span class="am-icon-heart am-icon-fw">收藏</span></a>

					</div>
					<li>
						<div class="clearfix tb-btn tb-btn-buy theme-login">
							<a id="LikBuy" title="点此按钮到下一步确认购买信息" href="#">立即购买</a>
						</div>
					</li>
					<li>
						<div class="clearfix tb-btn tb-btn-basket theme-login">
							<img id="itemimg" style="display: none;"
								src="uploads/${requestScope.item.productImgAdd }"> <a
								id="LikBasket" title="加入购物车" href="javascript:void(0)"><i></i>加入购物车</a>
						</div>
					</li>
				</div>

			</div>

			<div class="clear"></div>

		</div>


		<!-- introduce-->

		<div class="introduce">
			<div class="browse">
				<div class="mc">
					<ul>
						<div class="mt">
							<h2>看了又看</h2>
						</div>
						<!-- 猜你喜欢 这里要改 -->
						<li class="first">
							<div class="p-img">
								<a href="#"> <img class="" src="img/womenDetailGuess2.png">
								</a>
							</div>
							<div class="p-name">
								<a href="#"> ONLY冬装新品绵羊皮修身短款皮衣女 </a>
							</div>
							<div class="p-price">
								<strong>￥1749.30</strong>
							</div>
						</li>
						<li class="first">
							<div class="p-img">
								<a href="#"> <img class="" src="img/womenDetailGuess2.png">
								</a>
							</div>
							<div class="p-name">
								<a href="#"> ONLY冬装新品绵羊皮修身短款皮衣女 </a>
							</div>
							<div class="p-price">
								<strong>￥1749.30</strong>
							</div>
						</li>
						<li class="first">
							<div class="p-img">
								<a href="#"> <img class="" src="img/womenDetailGuess2.png">
								</a>
							</div>
							<div class="p-name">
								<a href="#"> ONLY冬装新品绵羊皮修身短款皮衣女 </a>
							</div>
							<div class="p-price">
								<strong>￥1749.30</strong>
							</div>
						</li>

					</ul>
				</div>
			</div>
			<div class="introduceMain">
				<div class="am-tabs" data-am-tabs>
					<ul class="am-avg-sm-3 am-tabs-nav am-nav am-nav-tabs">
						<li class="am-active"><a href="#"> <span
								class="index-needs-dt-txt">宝贝详情</span></a></li>

						<li><a href="#"> <span class="index-needs-dt-txt">全部评价</span></a>

						</li>

						<li><a href="#"> <span class="index-needs-dt-txt">猜你喜欢</span></a>
						</li>
					</ul>

					<div class="am-tabs-bd">

						<div class="am-tab-panel am-fade am-in am-active">
							<div class="J_Brand">
								<!-- 
										<div class="attr-list-hd tm-clear">
											<h4>产品参数：</h4></div>
										<div class="clear"></div>
										
										<ul id="J_AttrUL">
											<li title="">材质成分:&nbsp;PVC</li>
											<li title="">销售渠道类型:&nbsp;商场同款</li>
											<li title="">货号:&nbsp;11615T004</li>
											<li title="">:服装版型: &nbsp;直筒</li>
											<li title="">厚薄: &nbsp;常规</li>
											<li title="">品牌: &nbsp;ONLY</li>
											<li title="">组合形式: &nbsp;单件</li>
											<li title="">衣长: &nbsp;常规</li>
											<li title="">袖长: &nbsp;长袖</li>
											<li title="">领子: &nbsp;其他</li>
											<li title="">袖型: &nbsp;常规</li>
											<li title="">衣门襟: &nbsp;双排扣</li>
											<li title="">图案: &nbsp;纯色</li>
											<li title="">适用年龄: &nbsp;18-24周岁</li>
											<li title="">年份季节: &nbsp;2016年春季</li>
											<li title="">颜色分类: &nbsp;010黑/Black</li>
										</ul>
								 -->
								<div class="clear"></div>
							</div>

							<div class="details">
								<div class="attr-list-hd after-market-hd">
									<h4>商品细节</h4>
								</div>
								<!-- 修改 -->
								<div class="twlistNews">
									<c:forEach begin="5" items="${pics }" var="p" step="1">
										<img src="uploads/${p }" />
									</c:forEach>
								</div>
							</div>
							<div class="clear"></div>

						</div>

						<div class="am-tab-panel am-fade">

							<div class="actor-new">
								<div class="rate">
									<strong>100<span>%</span></strong><br> <span>好评度</span>
								</div>
								<dl>
									<dt>买家印象</dt>
									<dd class="p-bfc">
										<q class="comm-tags"><span>质量不错</span><em>(2177)</em></q> <q
											class="comm-tags"><span>版型好</span><em>(1860)</em></q> <q
											class="comm-tags"><span>穿着漂亮</span><em>(1823)</em></q> <q
											class="comm-tags"><span>商品不错</span><em>(1689)</em></q> <q
											class="comm-tags"><span>实惠</span><em>(1488)</em></q> <q
											class="comm-tags"><span>很舒服</span><em>(1392)</em></q> <q
											class="comm-tags"><span>价格便宜</span><em>(1119)</em></q> <q
											class="comm-tags"><span>特价买的</span><em>(865)</em></q> <q
											class="comm-tags"><span>尺寸很准</span><em>(831)</em></q>
									</dd>
								</dl>
							</div>
							<div class="clear"></div>
							<div class="tb-r-filter-bar">
								<ul class=" tb-taglist am-avg-sm-4">
									<li class="tb-taglist-li tb-taglist-li-current">
										<div class="comment-info">
											<span>全部评价</span> <span class="tb-tbcr-num">(32)</span>
										</div>
									</li>

									<li class="tb-taglist-li tb-taglist-li-1">
										<div class="comment-info">
											<span>好评</span> <span class="tb-tbcr-num">(32)</span>
										</div>
									</li>

									<li class="tb-taglist-li tb-taglist-li-0">
										<div class="comment-info">
											<span>中评</span> <span class="tb-tbcr-num">(32)</span>
										</div>
									</li>

									<li class="tb-taglist-li tb-taglist-li--1">
										<div class="comment-info">
											<span>差评</span> <span class="tb-tbcr-num">(32)</span>
										</div>
									</li>
								</ul>
							</div>
							<div class="clear"></div>


							<!--分页 -->
							<ul class="am-pagination am-pagination-right">
								<li class="am-disabled"><a href="#">&laquo;</a></li>
								<li class="am-active"><a href="#">1</a></li>
								<li><a href="#">2</a></li>
								<li><a href="#">3</a></li>
								<li><a href="#">4</a></li>
								<li><a href="#">5</a></li>
								<li><a href="#">&raquo;</a></li>
							</ul>
							<div class="clear"></div>

							<div class="tb-reviewsft">
								<div class="tb-rate-alert type-attention">
									购买前请查看该商品的 <a href="#" target="_blank">购物保障</a>，明确您的售后保障权益。
								</div>
							</div>

						</div>

						<div class="am-tab-panel am-fade">
							<div class="like">
								<ul class="am-avg-sm-2 am-avg-md-3 am-avg-lg-4 boxes">
									<li>
										<div class="i-pic limit">
											<img src="img/womenDetailGuess.png" />
											<p>
												ONLY含棉宽松带帽可调节腰带棉服女T <span>秋装新品 含棉面料 宽松版型 7天降退差价</span>
											</p>
											<p class="price fl">
												<b>¥</b> <strong>649.50</strong>
											</p>
										</div>
									</li>
									<li>
										<div class="i-pic limit">
											<img src="img/womenDetailGuess.png" />
											<p>
												ONLY含棉宽松带帽可调节腰带棉服女T <span>秋装新品 含棉面料 宽松版型 7天降退差价</span>
											</p>
											<p class="price fl">
												<b>¥</b> <strong>649.50</strong>
											</p>
										</div>
									</li>
									<li>
										<div class="i-pic limit">
											<img src="img/womenDetailGuess.png" />
											<p>
												ONLY含棉宽松带帽可调节腰带棉服女T <span>秋装新品 含棉面料 宽松版型 7天降退差价</span>
											</p>
											<p class="price fl">
												<b>¥</b> <strong>649.50</strong>
											</p>
										</div>
									</li>
									<li>
										<div class="i-pic limit">
											<img src="img/womenDetailGuess.png" />
											<p>
												ONLY含棉宽松带帽可调节腰带棉服女T <span>秋装新品 含棉面料 宽松版型 7天降退差价</span>
											</p>
											<p class="price fl">
												<b>¥</b> <strong>649.50</strong>
											</p>
										</div>
									</li>

								</ul>
							</div>
							<div class="clear"></div>

							<!--分页 -->
							<ul class="am-pagination am-pagination-right">
								<li class="am-disabled"><a href="#">&laquo;</a></li>
								<li class="am-active"><a href="#">1</a></li>
								<li><a href="#">2</a></li>
								<li><a href="#">3</a></li>
								<li><a href="#">4</a></li>
								<li><a href="#">5</a></li>
								<li><a href="#">&raquo;</a></li>
							</ul>
							<div class="clear"></div>

						</div>

					</div>

				</div>

				<div class="clear"></div>

				<div class="footer">
					<div class="footer-hd">
						<p>
							<a href="#">爱购集团</a> <b>|</b> <a href="#">商城首页</a> <b>|</b> <a
								href="#">支付宝</a> <b>|</b> <a href="#">物流</a>
						</p>
					</div>
					<div class="footer-bd">
						<p>
							<a href="#">关于爱购</a> <a href="#">合作伙伴</a> <a href="#">联系我们</a> <a
								href="#">网站地图</a> <em>(c) 2016-2026 iGo.com 版权所有</em>
						</p>
					</div>
				</div>
			</div>

		</div>

	</div>

	<!--菜单 -->
	<div class=tip>
		<div id="sidebar">
			<div id="wrap">
				<div id="prof" class="item">
					<a href="#"> <span class="setting"></span>
					</a>
					<div class="ibar_login_box status_login">
						<div class="avatar_box">
							<p class="avatar_imgbox">
								<img src="img/no-img_mid_.jpg" />
							</p>
							<ul class="user_info">
								<li>用户名：sl1903</li>
								<li>级&nbsp;别：普通会员</li>
							</ul>
						</div>
						<div class="login_btnbox">
							<a href="#" class="login_order">我的订单</a> <a href="#"
								class="login_favorite">我的收藏</a>
						</div>
						<i class="icon_arrow_white"></i>
					</div>

				</div>
				<div id="shopCart" class="item">
					<a href="#" id="cart"> <span class="message" id="message"></span>
					</a>
					<p>购物车</p>
					<p class="cart_num">
						<my:pt value="${sessionScope.map3 }" />
					</p>
				</div>
				<div id="asset" class="item">
					<a href="#"> <span class="view"></span>
					</a>
					<div class="mp_tooltip">
						我的资产 <i class="icon_arrow_right_black"></i>
					</div>
				</div>

				<div id="foot" class="item">
					<a href="#"> <span class="zuji"></span>
					</a>
					<div class="mp_tooltip">
						我的足迹 <i class="icon_arrow_right_black"></i>
					</div>
				</div>

				<div id="brand" class="item">
					<a href="#"> <span class="wdsc"><img src="img/wdsc.png" /></span>
					</a>
					<div class="mp_tooltip">
						我的收藏 <i class="icon_arrow_right_black"></i>
					</div>
				</div>

				<div id="broadcast" class="item">
					<a href="#"> <span class="chongzhi"><img
							src="img/chongzhi.png" /></span>
					</a>
					<div class="mp_tooltip">
						我要充值 <i class="icon_arrow_right_black"></i>
					</div>
				</div>

				<div class="quick_toggle">
					<li class="qtitem"><a href="#"><span class="kfzx"></span></a>
						<div class="mp_tooltip">
							客服中心<i class="icon_arrow_right_black"></i>
						</div></li>
					<!--二维码 -->
					<li class="qtitem"><a href="#none"><span
							class="mpbtn_qrcode"></span></a>
						<div class="mp_qrcode" style="display: none;">
							<img src="img/weixin_code_145.png" /><i class="icon_arrow_white"></i>
						</div></li>
					<li class="qtitem"><a href="#top" class="return_top"><span
							class="top"></span></a></li>
				</div>

				<!--回到顶部 -->
				<div id="quick_links_pop" class="quick_links_pop hide"></div>

			</div>

		</div>
		<div id="prof-content" class="nav-content">
			<div class="nav-con-close">
				<i class="am-icon-angle-right am-icon-fw"></i>
			</div>
			<div>我</div>
		</div>
		<div id="shopCart-content" class="nav-content">
			<div class="nav-con-close">
				<i class="am-icon-angle-right am-icon-fw"></i>
			</div>
			<div>购物车</div>
		</div>
		<div id="asset-content" class="nav-content">
			<div class="nav-con-close">
				<i class="am-icon-angle-right am-icon-fw"></i>
			</div>
			<div>资产</div>

			<div class="ia-head-list">
				<a href="#" target="_blank" class="pl">
					<div class="num">0</div>
					<div class="text">优惠券</div>
				</a> <a href="#" target="_blank" class="pl">
					<div class="num">0</div>
					<div class="text">红包</div>
				</a> <a href="#" target="_blank" class="pl money">
					<div class="num">￥0</div>
					<div class="text">余额</div>
				</a>
			</div>

		</div>
		<div id="foot-content" class="nav-content">
			<div class="nav-con-close">
				<i class="am-icon-angle-right am-icon-fw"></i>
			</div>
			<div>足迹</div>
		</div>
		<div id="brand-content" class="nav-content">
			<div class="nav-con-close">
				<i class="am-icon-angle-right am-icon-fw"></i>
			</div>
			<div>收藏</div>
		</div>
		<div id="broadcast-content" class="nav-content">
			<div class="nav-con-close">
				<i class="am-icon-angle-right am-icon-fw"></i>
			</div>
			<div>充值</div>
		</div>
	</div>
	<!--  -->
	<div id="loginnow">
		<div class="login-con" id="login_part">
			<div class="login-close">
				<a href="">x</a>
			</div>
			<div class="login-title">登 录</div>
			<div id="login">
				<div>
					<p class="error" id="J_Messahe"></p>
					<div class="user-email" id="username_field">
						<label for="email"><i class="am-icon-user login-i"></i></label> <input
							id="count" type="text" name="username" placeholder="请输入用户名">
					</div>
					<div class="user-pass" id="password_field">
						<label for="password"><i class="am-icon-lock login-i"></i></label>
						<input id="password" type="password" name="password"
							placeholder="设置密码">
					</div>
					<input id="page" hidden value="${requestScope.page }">
					<div>
						<button id="submitlogin" onclick="checkLogin()" class="loginbt">登
							录</button>
					</div>
				</div>
			</div>
			<hr>
		</div>
	</div>








	<script>
	$(function(){
		var $img = $("#itemimg");
		$img.hide();
	    var bool = new Parabola({
	        el: "#itemimg",
	         targetEl: $("#target"),
	            curvature: 0.0005,
	            duration: 1500,
	        callback:function(){
	       		$img.fadeOut();
	        },
	        stepCallback:function(x,y){
	            console.log(x,y);
	            $("<div>").appendTo("body").css({
	                "position": "absolute",
	                "top": this.elOriginalTop + y,
	                "left":this.elOriginalLeft + x,
	                "background-color":"",
	                "width":"5px",
	                "height":"5px",
	                "border-radius": "5px"
	            });
	        }
	    });
	    $("#run").click(function () {
	        bool.start();
	    });
		
		

		//$img.hide();
		var count = $("#text_box").val();
		var amount =${requestScope.item.amount};
		//offset: [780, -270],
		
		$("#add").click(function(){
			if(count<amount){
				count++;
				$(this).prev().val(count);
			}
		})
		$("#min").click(function(){
			if(count>1){
				count--;
				$(this).next().val(count);
			}
		})
		
		
		$("#LikBasket").click(function(event){
			var islog=${sessionScope.u.username}+"";
			
			//检查是否已经登陆
			if(islog==""||islog==null){
				showLoginWindow();
				$("#page").val("/");	
			}else{
				$img.fadeIn();
				setTimeout(bool.start(),3000);
				var username = getCookie("uname");
				var productId = $("#productId").text();
				var num = $("#text_box").val();
				$.ajax({
					url:base_path+"/addshoppingcart.do",
					type:"post",
					data:{
						"username":username,
						"productId":productId,
						"num":num
					},
					dataType:"text",
					success:function(result){
						var count = result;
						$("[name='count']").text(count);
						$(".cart_num").text(count);
					},
					error:function(){
						alert("添加购物车失败请重试"); 	
					}
				});
			}
		});
		$("#LikBuy").click(function(){
			var islog=${sessionScope.u.username}+"";
			var productId = $("#productId").text();
			if(islog==""||islog==null){
				showLoginWindow();
				$("#page").val("/");	
				return;
			}
			$.ajax({
				url:base_path+"/immediatepay.do",
				type:"post",
				data:{
					"productId":productId
				},
				dataType:"text",
				success:function(result){
					window.location.href="pay.jsp";
				},
				error:function(){
					alert("直接购买失败"); 	
				}
			});
		});
	})
	function showLoginWindow(){
		$("#certain").show();
		$("#loginnow").show();
	}
</script>

</body>
</html>
